# Maintainer: Cowington Post <cowingtonpost@gmail.com>
pkgname=mdbook-katex
pkgver=0.5.9
pkgrel=0
pkgdesc="Preprocessor for mdbook to render LaTeX equations in HTML"
url="https://github.com/lzanini/mdbook-katex"
arch="all"
license="MIT"
depends="mdbook"
makedepends="
	cargo
	cargo-auditable
	"
source="https://github.com/lzanini/mdbook-katex/archive/refs/tags/v$pkgver/mdbook-katex-$pkgver.tar.gz"
options="!check" # no tests

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -Dm755 target/release/mdbook-katex "$pkgdir"/usr/bin/mdbook-katex
}

sha512sums="
e712e421dd9743946389425081582e948b55a3f50ead592b10e4178918f9481098ccb4eff3d0eb26405b76184a6a7ffff37321391cbc0ab22dd9cb8c73107c42  mdbook-katex-0.5.9.tar.gz
"
